package cn.xy

import java.util.HashMap;

/**
  * Created by xiaoyuan on 2017/11/13.
  */
object JavaMapUserScala {
  def main(args: Array[String]): Unit = {
    var map= new HashMap[String,Integer]();
    map.put("a",123);
    println(map.get("a"))

    var scalaMap:Map[String,Int]= Map();
    scalaMap+=("a"->456);
    for(temp<-scalaMap){
      println("for--"+temp);
    }
    println(scalaMap("a"))
    println(scalaMap.getOrElse("b",null))
    println(scalaMap.get("a").get)
    println(scalaMap)
  }
}
